#include <iostream>   
#include <cstdlib>  

#include "binarysearchtree.h"
#include <algorithm> 
#include <fstream> 
#include <vector>
#include <sstream>


using namespace std;

int main()
{
    BinarySearchTree<int> t;
    std::vector<int> _arr;
    std::vector<int> _intarr;

    int mode;
    int k;

    bool correct = true;
    
    
	while (k=getchar())
	{
        if(isdigit(k) != 0)
		{
            _arr.push_back(k-48);
        }
        else if(k==' '){
            ;
        }
        else if(k=='\n'){
            break;
        }
        else
        {
            correct = false;
            break;
        }
	}
    if(correct == true)
    {
         
        t.BSTSorting(_arr,mode);
    }
    else
    {
        cout << "The type entered is incorrect! " << endl;
    }
    return 0;
}